package com.qiyuexinxi.chat.mapper;

import com.qiyuexinxi.chat.domain.Attention;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AttentionMapper {

    int updateByUserId(Attention record);

    /**根据用户id获取正常的关注列表.*/
    List<Attention> selectAttentionStatusByUserId(Integer userId);

    List<Attention> selectAttentionByUserId(Integer userId);

    List<Attention> selectByAttentionUser(Integer userId);

    //判断请求用户userId 是否关注 attentionUserid 返回数量
    int selectCountAserIdAndAttentionUserid(@Param("userId") Integer userId, @Param("attentionUserid") Integer attentionUserid);

    int deleteByPrimaryKey(Integer attentionId);

    int insert(Attention record);

    int insertSelective(Attention record);

    Attention selectByPrimaryKey(Integer attentionId);

    int updateByPrimaryKeySelective(Attention record);

    int updateByPrimaryKey(Attention record);
}